<?php
require_once('../lib/standard.php');

global $pineza;
set_pineza();

if ((!perastike('login')) || (!$_REQUEST['login'])) telos('no login name passed');
else $login = $_REQUEST['login'];
if ($login != $pineza->login) telos('access denied!');

if (!perastike('board')) telos('no board passed');
else $board = $_REQUEST['board'];

if (!perastike('title')) telos('no title passed');
else $title = $_REQUEST['title'];

$query = "UPDATE `board` SET `title` = '" . escape($title) . "' " .
	"WHERE `user` = '" . escape($login) . "' AND `color` = '" .
	escape($board) . "' LIMIT 1";
mysqli_query($pineza->db, $query);

$pineza->close_database();
print AJAX_SEP;
?>
